<?php

/**
 * ingresos form base class.
 *
 * @package    gescell
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseingresosForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                    => new sfWidgetFormInputHidden(),
      'detalles_del_ingreso'  => new sfWidgetFormInput(),
      'importe'               => new sfWidgetFormInput(),
      'categoria_ingresos_id' => new sfWidgetFormPropelChoice(array('model' => 'categoria_ingresos', 'add_empty' => true)),
      'sf_guard_user'         => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => false)),
      'created_at'            => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                    => new sfValidatorPropelChoice(array('model' => 'ingresos', 'column' => 'id', 'required' => false)),
      'detalles_del_ingreso'  => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'importe'               => new sfValidatorNumber(array('required' => false)),
      'categoria_ingresos_id' => new sfValidatorPropelChoice(array('model' => 'categoria_ingresos', 'column' => 'id', 'required' => false)),
      'sf_guard_user'         => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id')),
      'created_at'            => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('ingresos[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'ingresos';
  }


}
